Re: [NTG-context] $\sin \theta$ behave differently in metafun

2022-04-15 Thread śrīrāma via ntg-context
$Q=(\cos(-\theta), \sin(-\theta))$"), B); > C := (xpart A, 0); label.lrt(textext("$A$"), C); > label(textext("$O$"), origin); > \stopbuffer > \starttext > I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text instead > of $\sin$ and $\c

[NTG-context] $\sin \theta$ behave differently in metafun

2022-04-15 Thread Jeong Dal via ntg-context
origin); \stopbuffer \starttext I'd like use $\sin$ and $\cos$ in the metafun. But it shows strange text instead of $\sin$ and $\cos$. \processMPbuffer[pointCircle] \stoptext > 2022. 4. 13. 오전 11:09, ntg-context-requ...@ntg.nl 작성: > > Send ntg-context mailing list submission

Re: [NTG-context] MetaPost Examples

2021-09-01 Thread Henning Hraban Ramm via ntg-context
h (p)(2minStrokeWidth*sin(offsetPathLength*pi)); >> \stopbuffer >> \typebuffer >> ... and then how do I get the MP graphic? > \processMPbuffer “of course” Thank you! Used here: https://github.com/fiee/fiziko/blob/master/fiziko.mkiv Hraban ___

Re: [NTG-context] MetaPost Examples

2021-09-01 Thread Hans Hagen via ntg-context
; p := (0,0){dir(30)}..(5cm, 0)..{dir(30)}(10cm, 0); draw brush (p)(2minStrokeWidth*sin(offsetPathLength*pi)); \stopbuffer \typebuffer ... and then how do I get the MP graphic? \processMPbuffer

Re: [NTG-context] weekend upload

2021-07-10 Thread Hans Hagen
ead. Although I could emulate it in mkiv, it is currently an LMTX only feature. The (optional) list accepts the usual {1,2,5,7-9} kind of specification. Very interesting. What will be the syntax to use this with \processMPbuffer and \startMPcode? In order to avoid a slash I went for the 'stacking

Re: [NTG-context] weekend upload

2021-07-09 Thread Hans Hagen
ead. Although I could emulate it in mkiv, it is currently an LMTX only feature. The (optional) list accepts the usual {1,2,5,7-9} kind of specification. Very interesting. What will be the syntax to use this with \processMPbuffer and \startMPcode? For now just use: \setupMPvariables[list=4] e

Re: [NTG-context] weekend upload

2021-07-09 Thread Aditya Mahajan
advantage is that one doesn't have to set up a graphic in > order (read: save pictures, flush them later on) and it is actually a > rather cheap extension in terms of runtime and overhead. Although I > could emulate it in mkiv, it is currently an L

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-23 Thread Jeong Dal
of animation using \processMPbuffer which I did before. You can see it using adobe reader. \startbuffer[UDBasic] pair A,B,C,D; pair E, F, G, H; path p,q; numeric ang,maxNum; u:=1in; A=(.95*TextWidth,u); B=(0,u); C=(0,0); D=(.95*TextWidth,0); p := A--B--C--D; q := (TextWidth,1.5u)--(0,1.5u)--(0

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-22 Thread Otared Kavian
ge and the > folding line which bisect the angle of the former folding line [M,N]. > > H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B]; > > Enjoy the use of “whatever”! > > I made an animation of the folding process using animation module and > \proce

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Jeong Dal
is the intersection point of the edge and the folding line which bisect the angle of the former folding line [M,N]. H := whatever[N, N + dir(.5*angle(M-N))*u] = whatever[A,B]; Enjoy the use of “whatever”! I made an animation of the folding process using animation module and \processMPbuffer. But Woldgang’s

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Mikael Sundqvist
Hans > >> using this expression, but I had always thought this is just a name… > >> > >> Best regards: Otared > >> > >>> On 21 Jun 2021, at 06:26, Aditya Mahajan wrote: > >>> > >>> On Mon, 21 Jun 2021, Jeong Dal wrote: > >

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Otared Kavian
;> On 21 Jun 2021, at 06:26, Aditya Mahajan wrote: >>> >>> On Mon, 21 Jun 2021, Jeong Dal wrote: >>> >>>> >>>> Hi, >>>> >>>> I defined a macro definition in metafun, and draw figures using >>>

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Mikael Sundqvist
2021, Jeong Dal wrote: > > > >> > >> Hi, > >> > >> I defined a macro definition in metafun, and draw figures using > >> \startbuffer[] … \stopbuffer and \processMPbuffer[]. > >> As you see in the attached code, the same macro definitio

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-21 Thread Otared Kavian
ing >> \startbuffer[] … \stopbuffer and \processMPbuffer[]. >> As you see in the attached code, the same macro definition is used >> repeatedly by changing the numeric argument. >> Is there a better way to simplify the code, for example, using \dorecurse >> and recurse

Re: [NTG-context] simplifying repeated macro calls in metafun

2021-06-20 Thread Aditya Mahajan
On Mon, 21 Jun 2021, Jeong Dal wrote: > > Hi, > > I defined a macro definition in metafun, and draw figures using > \startbuffer[] … \stopbuffer and \processMPbuffer[]. > As you see in the attached code, the same macro definition is used repeatedly > by changing

[NTG-context] simplifying repeated macro calls in metafun

2021-06-20 Thread Jeong Dal
Hi, I defined a macro definition in metafun, and draw figures using \startbuffer[] … \stopbuffer and \processMPbuffer[]. As you see in the attached code, the same macro definition is used repeatedly by changing the numeric argument. Is there a better way to simplify the code, for example

[NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Jeong Dal
\startbuffer[test] label(textext("$\{a,b\}$"),origin); \stopbuffer \starttext Let $A = \{a,b\}$. \processMPbuffer[test] \stoptext Thanks. Best regards, Dalyoung___ If your question is of interest to othe

Re: [NTG-context] missing "{ }" in metafun.

2021-03-14 Thread Hans Hagen
LMTX  fmt: 2021.3.14  int: english/english \startbuffer[test] label(textext("$\{a,b\}$"),origin); \stopbuffer \starttext Let $A = \{a,b\}$. \processMPbuffer[test] \stoptext \$ \_ \& \{ \} become letters when we flush a mp graphic, so use \lbrace \

Re: [NTG-context] add more blank space when using \starteffect[hidden]

2021-03-13 Thread Hans Hagen
}{\stopeffect\blank[5cm]}} %\enablemode[hideSolution] \starttext \framed[]{This is what I want:} \framedtext[]{ \StartHide \samplefile{knuth} Overbar is not \overbar{hidden}. {\processMPbuffer[circles]} \StopHide } \stoptext In your case it's easier than you mightt think: \framedtext[empty=yes

[NTG-context] add more blank space when using \starteffect[hidden]

2021-03-12 Thread Jeong Dal
[hideSolution] \starttext \framed[]{This is what I want:} \framedtext[]{ \StartHide \samplefile{knuth} Overbar is not \overbar{hidden}. {\processMPbuffer[circles]} \StopHide } \stoptext ___ If your

Re: [NTG-context] Combining modes and MetaFun

2020-09-06 Thread Jan Willem Flamma
ometxt{lengte},  (0.5u,-0.4u)) ;}> >      %\doifmode{en}{label(\sometxt{width},   (1.6u, 0.5u)) ;}> >      %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;}> > \stopbuffer> > \placefigure> >      [here,none][]{}> >      {\scale[width=0.5\textwidth]{\processMPb

Re: [NTG-context] Combining modes and MetaFun

2020-09-04 Thread Hans Hagen
, 0.5u)) ;}     %\doifmode{nl}{label(\sometxt{breedte}, (1.6u, 0.5u)) ;} \stopbuffer \placefigure     [here,none][]{}     {\scale[width=0.5\textwidth]{\processMPbuffer[square]}} \stoptext You need to compensate these solutions by "wikifying" them: \starttext \startuseMPgraphic{w

[NTG-context] Combining modes and MetaFun

2020-09-04 Thread Jan Willem Flamma
 \placefigure    [here,none][]{}    {\scale[width=0.5\textwidth]{\processMPbuffer[square]}} \stoptext  ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context

Re: [NTG-context] Code lua in a table

2020-07-20 Thread Jeong Dal
cimal tt & "$"),now); endfor; endfor; \stopbuffer \startluacode P={} combi = P function P.fact (n) if n <= 0 then return 1 else return n * P.fact(n-1) end end function P.ncr(n,r) return P.fact(n)/(P.fact(r)*P.fact

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
path p, q ; pair A, B, start, now; >u := 1.8cm; >A := dir(210)*u; >B := dir(-30)*u; >dy := sind(30)*u; >dx := 2*cosd(30)*u; >for n = 0 upto 4: >start := n*dir(210)*u; >for r = 0 upto n: >s := n - r; > now := start + r*r

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Hans Hagen
p; "} = "& decimal tt & "$"),now); dotlabel.top(textext("$\displaystyle {" & decimal n & "\choose" & decimal r &

Re: [NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Otared Kavian
uot; & decimal r & > ")*fact(" & decimal s &" )))"); > tt := lua("mp.print(combi(" & decimal n & "," & decimal r & " ))"); > > now := start+r*right*dx; > dotlabel.top(textext("$

[NTG-context] running lua in metafun and in ConTeXt

2020-04-11 Thread Jeong Dal
xt("$\displaystyle {" & decimal n & "\choose" & decimal r & "} = "& decimal tt & "$"),now); draw now -- (now+A); draw now -- (now+B); endfor; endfor; \stopbuffer \starttext \switchtobodyfont[11pt] \processMPbuffer[fig121] \switcht

Re: [NTG-context] margintext and floats in the margin

2020-01-31 Thread Jan Willem Flamma
arkblue) > withpen pencircle scaled 2pt ; > \stopbuffer > > \starttext > > This is some text.\margintext{This is a remark in the margin.} > This is some more text.\margintext{This text is also in the margin.} > \startplacefigure[location=outerm

[NTG-context] margintext and floats in the margin

2020-01-29 Thread Otared Kavian
ome text.\margintext{This is a remark in the margin.} This is some more text.\margintext{This text is also in the margin.} \startplacefigure[location=outermargin,number=no] \scale[width=\rightmarginwidth]{\processMPbuffer[sine]} \stopplacefigure \stoptext % end

[NTG-context] margintext and floats in the margin

2020-01-26 Thread Otared Kavian
ome text.\margintext{This is a remark in the margin.} This is some more text.\margintext{This text is also in the margin.} \startplacefigure[location=outermargin,number=no] \scale[width=\rightmarginwidth]{\processMPbuffer[sine]} \stopplacefigure \stoptext % end

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-16 Thread Hans Hagen
tartbuffer[3x3b] wu := \MPvar{width}; drawGridF (3)  (1,2,3,0,1, 1,4,5,8); \stopbuffer \starttext \setupMPvariables[width=30pt] \processMPbuffer[defs,3x3b] \stoptext \startbuffer[defs] def drawGridF (expr nb) (text s) =    path p ;    picture pic ;    numeric n; p := unitsquare scaled wu; n:= 0; f

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-15 Thread Jeong Dal
div nb; >> pic := image (draw p; label(textext(m), center p); ); >> draw pic shifted (i*wu, j*wu); >> n:= n+ 1; >> endfor; >> enddef; >> \stopbuffer >> \startbuffer[3x3b] >> wu := \MPvar{width}

Re: [NTG-context] MetaFun: how to check the number of arguments

2019-01-15 Thread Hans Hagen
); n:= n+ 1; endfor; enddef; \stopbuffer \startbuffer[3x3b] wu := \MPvar{width}; drawGridF (3) (1,2,3,0,1, 1,4,5,8); \stopbuffer \starttext \setupMPvariables[width=30pt] \processMPbuffer[defs,3x3b] \stoptext \startbuffer[defs] def drawGridF (expr nb) (text s) = path p

[NTG-context] MetaFun: how to check the number of arguments

2019-01-14 Thread Jeong Dal
; enddef; \stopbuffer \startbuffer[3x3b] wu := \MPvar{width}; drawGridF (3) (1,2,3,0,1, 1,4,5,8); \stopbuffer \starttext \setupMPvariables[width=30pt] \processMPbuffer[defs,3x3b] \stoptext > 2019. 1. 14. 오후 8:00, ntg-context-requ...@ntg.nl 작성: > > Send ntg-context mailing list su

Re: [NTG-context] Metafun: Finding intersection between characters

2018-09-26 Thread Jeong Dal
ang] picture first ; first := outlinetext.p("왕") ; first := first scaled 10 ; filloutlinetext(first ) withcolor .5[blue,white] ; drawoutlinetext(first ) ; \stopbuffer \starttext \processMPbuffer[ho] \processMPbuffer[ha]

Re: [NTG-context] labeling in meta post

2018-09-06 Thread Henri Menke
tex $\delta$ etex, (3cm,0)); Why not just label.bot("$\delta$", (3cm,0)); > label.bot(btex $\frac{2-\delta}{2}$ etex, (5cm,0)); % > \stopbuffer > \starttext > \processMPbuffer[delta] > \stoptext > > Best regards, > > Dalyoung > _

[NTG-context] labeling in meta post

2018-09-06 Thread Jeong Dal
)); % \stopbuffer \starttext \processMPbuffer[delta] \stoptext Best regards, Dalyoung ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl

Re: [NTG-context] metafun: error when I call the same function twice consecutively.

2018-05-31 Thread Henri Menke
) = numeric size; size := m*u; for i = 0 upto (n*n-1): z[i] = ((i mod n),(floor(i/n)))*size; drawdot z[i] withpen pencircle scaled 5pt withcolor blue; endfor; enddef; fap(2,2); fap(3,2); \stopbuffer \starttext \processMPbuffer[test] \stoptext

[NTG-context] metafun: error when I call the same function twice consecutively.

2018-05-31 Thread Jeong Dal
; enddef; fap(2,2); fap(3,2); \stopbuffer \starttext \processMPbuffer[test] \stoptext ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http

[NTG-context] blank line at the beginning of the theorem or proof

2018-05-12 Thread Jeong Dal
%\placefigure[right][]{}{\processMPbuffer[circleA]} This is a test for placing a figure in the theorem or in the proof. \tex{placefigure[right][]{}{\processMPbuffer[circleA]}} insert a blank line at the beginning of the paragraph while there is no blank line without a figure. %\placefigure[right

Re: [NTG-context] getting the glyph of a character

2017-05-01 Thread Mohammad Hossein Bateni
(56); > picture q; > path p; > interim ahlength := 12bp; > interim ahangle := 25; > q := glyph “E" of "ec-lmr10" scaled .2; > %draw q; > for item within q: > p := pathpart item; > draw p withcolor

Re: [NTG-context] getting the glyph of a character

2017-05-01 Thread Jeong Dal
th := 12bp; interim ahangle := 25; q := glyph “E" of "ec-lmr10" scaled .2; %draw q; for item within q: p := pathpart item; draw p withcolor (.6,.9,.6) withpen pencircle scaled 1.5; endfor \stopbuffer \starttext \processMP

Re: [NTG-context] getting the glyph of a character

2017-05-01 Thread Jeong Dal
q := glyph “E" of "ec-lmr10" scaled .2; %draw q; for item within q: p := pathpart item; draw p withcolor (.6,.9,.6) withpen pencircle scaled 1.5; endfor \stopbuffer \starttext \processMP

[NTG-context] getting the glyph of a character

2017-05-01 Thread Jeong Dal
make it happen using the following code. \startbuffer[outline] %fontmapfile "=lm-ec.map"; picture q; path p; interim ahlength := 12bp; interim ahangle := 25; q := glyph 100 of "ArialMT"; %nfont defaultfont scaled defaultscale; draw q; \stopbuffer \starttext \pro

Re: [NTG-context] buffers inside startMPpage

2016-10-14 Thread Jan Willem Flamma
list members, >> >> I create all my MetaFun drawings in a separate environment file where each >> individual drawing sits inside a start/stopbuffer. This allows me to easily >> use those drawings in all my documents using \processMPbuffer[name]. Works >> just fine

Re: [NTG-context] buffers inside startMPpage

2016-10-14 Thread Wolfgang Schuster
using \processMPbuffer[name]. Works just fine. However, I also wish to have all the drawing available in a pdf file (each drawing on a separate page). This allows me to split the pdf and use the drawing elsewhere (e.g. in a Powerpoint) or include page(s) from the pdf in another document. The

[NTG-context] buffers inside startMPpage

2016-10-14 Thread Jan Willem Flamma
Dear list members, I create all my MetaFun drawings in a separate environment file where each individual drawing sits inside a start/stopbuffer. This allows me to easily use those drawings in all my documents using \processMPbuffer[name]. Works just fine. However, I also wish to have all

[NTG-context] \startanimation and \dorecurse

2014-10-20 Thread Jeong Dal
\startanimation { \dorecurse{5}{% \setupMPvariables[Circles][s=\recurselevel] \processMPbuffer [Circles] }} \stopanimation \stoptext It seems to me that \startanimation just treat the figures {\dorecurse … } as just one figure. Is there a way to treat it 5 figures to generate animation? Thank

Re: [NTG-context] \startanimation and \dorecurse

2014-10-20 Thread Wolfgang Schuster
; draw fullcircle scaled \MPrawvar{Circles}{s}u; \stopbuffer \starttext \startanimation { \dorecurse{5}{% \setupMPvariables[Circles][s=\recurselevel] \processMPbuffer [Circles] }} \stopanimation \stoptext It seems to me that \startanimation just treat the figures {\dorecurse … } as just

Re: [NTG-context] passing arguments to \processMPbuffer

2014-04-22 Thread Jeong Dal
Dear Wolfgang, Thank you for your solution. Sometimes I need to use \processMPbuffer for the animated graphics. BTW, what is the differences between ‘MPrawvar’ and ‘MPvar’. MPvar didn’t work in your example. Best regards, Dalyoung

Re: [NTG-context] passing arguments to \processMPbuffer

2014-04-22 Thread Wolfgang Schuster
Am 22.04.2014 um 14:42 schrieb Jeong Dal hak...@me.com: Dear Wolfgang, Thank you for your solution. Sometimes I need to use \processMPbuffer for the animated graphics. BTW, what is the differences between ‘MPrawvar’ and ‘MPvar’. MPvar didn’t work in your example. The \Mprawvar command

[NTG-context] passing arguments to \processMPbuffer

2014-04-21 Thread Jeong Dal
}[origin,3u*dir(30*i)]) ; endfor; \stopuseMPgraphic \starttext \placefigure[][]{} {\useMPgraphic{ColoringFace::Labeling}{s=0.8, t=1.3}} \stoptext Is there a way to the same job for \processMPbuffer instead of .5 and .7 in buffer? \startbuffer[Labels]%{s, t} numeric u; u:= 1cm; for i=0

Re: [NTG-context] passing arguments to \processMPbuffer

2014-04-21 Thread Wolfgang Schuster
*dir(30*i)]) ; label (textext($v_{ decimal (i) }$ ), \MPvar{t}[origin,3u*dir(30*i)]) ; endfor; \stopuseMPgraphic \starttext \placefigure[][]{} {\useMPgraphic{ColoringFace::Labeling}{s=0.8, t=1.3}} \stoptext Is there a way to the same job for \processMPbuffer instead

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2013-08-09 Thread Aditya Mahajan
by testfig.mp Any particular reason that you are compiling metapost files using mp and then including them in ConTeXt rather than directly using any one of the inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, \processMPbuffer, etc.) beginfig(1) label(btex $\Omega$ etex, (0,0

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2013-08-09 Thread Sanjoy Mahajan
of the inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, \processMPbuffer, etc.) Mostly conservatism. I cannot quite figure out the canonical replacement for btex ... etex (textext, sometext?), and then I get confused by the many possible environments. What do you

Re: [NTG-context] internal mptopdf converter skips some glyphs in labels

2013-08-09 Thread Aditya Mahajan
in ConTeXt rather than directly using any one of the inbuilt ConTeXt environments for handling mp (\startMPcode, \useMPgraphic, \processMPbuffer, etc.) Mostly conservatism. I cannot quite figure out the canonical replacement for btex ... etex (textext, sometext?), and then I get confused by the many

[NTG-context] command for a MP graphic

2013-05-07 Thread Roland Thiers
withcolor blue; \stopbuffer \define \polyreg {\processMPbuffer[largeurdeslignes,polygoneregulier,cercleunite]} \starttext \polyreg \stoptext Thanks, Roland Thiers ___ If your question is of interest to others as well

[NTG-context] TeX macro to MP variable

2013-03-16 Thread Marco Patzer
to to the job, but it's TeX, not MetaPost. What comes to mind is a \processMPbuffer before every MPgraphic: \startbuffer[foo] size := \somesize ; \stopbuffer \startuseMPgraphic{alpha} fill unitcircle scaled size; \stopuseMPgraphic \starttext \def\somesize{1cm} \processMPbuffer[foo

Re: [NTG-context] TeX macro to MP variable

2013-03-16 Thread Hans Hagen
. The setups key from \defineMPinstance seems to to the job, but it's TeX, not MetaPost. What comes to mind is a \processMPbuffer before every MPgraphic: \startbuffer[foo] size := \somesize ; \stopbuffer \startuseMPgraphic{alpha} fill unitcircle scaled size; \stopuseMPgraphic \starttext

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Aditya Mahajan
; \stopbuffer \startlines Only draw T: \processMPbuffer[initialize,T] Only draw Q: \processMPbuffer[initialize,Q] Draw T Q : \processMPbuffer[initialize,T,Q] Draw Q T : \processMPbuffer[initialize,Q,T] \stoplines Aditya

Re: [NTG-context] Metafun textext()

2013-01-10 Thread Hans Hagen
:= textext(Hello); picture Q; Q := T; \stopbuffer \startbuffer[T] draw T withcolor blue; \stopbuffer \startbuffer[Q] draw Q shifted (-1mm, 1mm) withcolor red; \stopbuffer \startlines Only draw T: \processMPbuffer[initialize,T] Only draw Q: \processMPbuffer[initialize,Q] Draw T Q

Re: [NTG-context] MetaPost Animations

2012-12-31 Thread Jeong Dal
Dear Wolfgang, Thank you for the explanation, and your sample works nicely. I enclosed \processMPbuffer using \startframe and \stopframe as following. Then I got a 'undefined control sequence' error. If I use '\framed[]' instead of '\startframe … \stopframe', then it gave all 7 circles

Re: [NTG-context] MetaPost Animations

2012-12-31 Thread Wolfgang Schuster
Am 01.01.2013 um 04:50 schrieb Jeong Dal hak...@me.com: Dear Wolfgang, Thank you for the explanation, and your sample works nicely. I enclosed \processMPbuffer using \startframe and \stopframe as following. Then I got a 'undefined control sequence' error. If I use '\framed[]' instead

Re: [NTG-context] MetaPost Animations

2012-12-30 Thread Jeong Dal
[menu=yes] {\processMPbuffer[base, fig1]} {\processMPbuffer[base, fig2]} {\processMPbuffer[base, fig3]} \stopanimation \stoptext % I also tried to simplify the code as following, but it just draw 10 figures not an animation. Is there a way to combine them as an animation? Thank you

Re: [NTG-context] Using MPgraphics as externalfigures?

2012-08-03 Thread Mari Voipio
fullsquare rotated 45 scaled 2cm withcolor blue; \stopreusableMPgraphic \startbuffer [third] fill fullsquare scaled 1cm withcolor green; \stopbuffer \starttext \useMPgraphic{first} \reuseMPgraphic{second} \processMPbuffer [third] \MPframed{second} \stoptext Thank you! I'll have

Re: [NTG-context] Using MPgraphics as externalfigures?

2012-08-03 Thread Aditya Mahajan
not always want them, but that \framed{\getbuffer} construction is downright ugly. (Untested code, but this should work) \startbuffer[figure 1] draw fullcircle scaled 1cm; \stopbuffer \startbuffer[frame] draw (bbox currentpicture) withcolor blue; \stopbuffer \processMPbuffer[figure 1, frame

Re: [NTG-context] Using MPgraphics as externalfigures?

2012-08-02 Thread Marco Patzer
rotated 45 scaled 2cm withcolor blue; \stopreusableMPgraphic \startbuffer [third] fill fullsquare scaled 1cm withcolor green; \stopbuffer \starttext \useMPgraphic{first} \reuseMPgraphic{second} \processMPbuffer [third] \MPframed{second} \stoptext Marco

Re: [NTG-context] scaling the mp figure in ConTeXt

2011-11-14 Thread Hans Hagen
On 14-11-2011 08:23, Jeong Dalyoung wrote: \startbuffer[test] draw fullcircle scaled 3cm; \stopbuffer \starttext \placefigure[][]{} \processMPbuffer[test] \stoptext currentpicture := currentpicture xsized(TextWidth) ; or \placefigure[][]{}{\scale[width=\textwidth]{\processMPbuffer[test

[NTG-context] scaling the mp figure in ConTeXt

2011-11-13 Thread Jeong Dalyoung
Dear all, I use MetaFun to create a figure and embed it using \processMPbuffer[]. for example, \startbuffer[test] draw fullcircle scaled 3cm; \stopbuffer \starttext \placefigure[][]{} \processMPbuffer[test] \stoptext But sometimes, I need to rescaling the mp figure to fit the page

Re: [NTG-context] metapost to pdf on the fly

2011-10-03 Thread Meer, H. van der
I am afraid I don't completely understand this. Doing: \startbuffer[fig-1] \startMPcode draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle withcolor darkgreen; label(textext(Test),origin); \stopMPcode \stopbuffer \starttext \processMPbuffer[fig-1] \stoptext I get

Re: [NTG-context] metapost to pdf on the fly

2011-10-03 Thread Wolfgang Schuster
\stopbuffer \starttext \processMPbuffer[fig-1] \stoptext This works: \startbuffer[fig-1] draw (-20,0) .. (0,20) .. (20,0) .. (0,-20) .. cycle withcolor \MPcolor{darkgreen}; label(textext(Test),origin); \stopbuffer \starttext \processMPbuffer[fig-1] \stoptext Wolfgang

Re: [NTG-context] metapost to pdf on the fly

2011-10-03 Thread Meer, H. van der
. van der: I am afraid I don't completely understand this. Doing: \startbuffer[fig-1] \startMPcode draw origin-(20,0) .. origin+(0,20) .. origin+(20,0) .. origin+(0,-20) .. cycle withcolor darkgreen; label(textext(Test),origin); \stopMPcode \stopbuffer \starttext \processMPbuffer[fig-1

Re: [NTG-context] metapost to pdf on the fly

2011-09-29 Thread Aditya Mahajan
and in the main file \environment figures \starttext \processMPbuffer[fig-1] \stoptext This way you can also combine multiple figures using \processMPbuffer[fig-common,fig-1] etc. The metapost processing is fast enough that there is no noticable speed difference. Aditya

Re: [NTG-context] Metafun shifting pictures - again

2011-06-24 Thread dalyoung
); dominoV (3, 3, 3, 0); currentpicture := finalpicture; \stopbuffer \starttext \processMPbuffer[dominos] \stoptext Thank you again. Best regards, Dalyoung On 2011. 6. 23., at 오후 4:41, Hans Hagen wrote: On 23-6-2011 6:32, Jeong Dalyoung wrote: Hi all, I got the reason why the pictures

Re: [NTG-context] Metafun shifting pictures - again

2011-06-24 Thread Hans Hagen
\starttext \processMPbuffer[dominos] \stoptext - Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | voip: 087 875 68 74

Re: [NTG-context] Metafun shifting pictures - again

2011-06-23 Thread Hans Hagen
and \processMPbuffer[]. it draw the first domino at the right place, but it is rotated when the second domino is drawn. Hence, it actually rotated 180 degree. Also two dominos rotated again when the third domino is drawn. Previous drawings are rotated again again when the function domino called. How

Re: [NTG-context] Metafun shifting pictures - again

2011-06-22 Thread Jeong Dalyoung
; draw something 2; pic := currentpicture; draw pic rotated 90 shifted ( c, d ); enddef; and call it using \startbuffer[domino3] domino (1, 2, 3, 4); domino (2, 1, 1, 2); domino (3, 3, 2, 3); \stopbuffer and \processMPbuffer[]. it draw the first domino

[NTG-context] about JS(Walk_Field{})

2011-05-14 Thread Jeong Dalyoung
\setupinteraction[state=start] \startbuffer[a] draw fullcircle scaled 1cm; \stopbuffer \startbuffer[b] draw fullcircle scaled 2cm; \stopbuffer \startbuffer[c] draw fullcircle scaled 3cm; \stopbuffer \definesymbol[step1][{\processMPbuffer[a]}] \definesymbol[step2][{\processMPbuffer[a,b

[NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread dalyoung
: for j = 1 upto i: draw p shifted (lastpoint+.32*j*u,.3u); endfor; bwidth := .32i*u+.5u; draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u); lastpoint := lastpoint+bwidth; endfor; enddef; draw_balls; \stopbuffer \starttext \processMPbuffer[a] \stoptext

Re: [NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread Peter Rolf
: draw p shifted (lastpoint+.32*j*u,.3u); endfor; bwidth := .32i*u+.5u; draw (lastpoint,0) -- (lastpoint +bwidth,0) -- (lastpoint +bwidth,u); lastpoint := lastpoint+bwidth; endfor; enddef; draw_balls; \stopbuffer \starttext \processMPbuffer[a] \stoptext works

Re: [NTG-context] metafun- how to pass array as an argument

2011-01-24 Thread Peter Rolf
, i forgot to change this line. example code is attached for testing... \stopbuffer \starttext \processMPbuffer[a] \stoptext works in mkii, but fails in mkiv. i use an outdated version (31.12.2010) here. ! LuaTeX error main ctx instance:1: attempt to call field 'feedback' (a nil value

Re: [NTG-context] [MP] labels of points on a circle

2009-10-19 Thread Boštjan Vesnicer
; drawpoints p; drawpointlabels p; \stopbuffer \placefigure[middle][]{}{\processMPbuffer[point2]} Then it draw everything well except writing labels inside the circle. How can I write the labels of the  points outside of the circle? I'd like to draw 9 points randomly on a circle

[NTG-context] Metapost and mkiv

2009-09-22 Thread Otared Kavian
][-]{}{\processMPbuffer[axes-1]} {} \stoptext %% end ___ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http

Re: [NTG-context] mkiv and MetaPost

2009-01-14 Thread Otared Kavian
On 14 janv. 09, at 08:57, Taco Hoekwater wrote: Otared Kavian wrote: Thanks Aditya for your explanation, but I must say that it is not convincing because with mkiv one of the buffers is processed with \processMPbuffer, while the other is not… So there must be some other hidden behaviour

[NTG-context] mkiv and MetaPost

2009-01-13 Thread Otared Kavian
Hi all, I have a file which contains the lines below: I can typeset it and obtain a correct result with mkii, but not with mkiv (the second buffer named axes-1 does not result in a MetaPost graphic when one says \processMPbuffer[axes-1]). The file and the resulting PDF can be found

Re: [NTG-context] mkiv and MetaPost

2009-01-13 Thread Aditya Mahajan
On Wed, 14 Jan 2009, Otared Kavian wrote: Hi all, I have a file which contains the lines below: I can typeset it and obtain a correct result with mkii, but not with mkiv (the second buffer named axes-1 does not result in a MetaPost graphic when one says \processMPbuffer[axes-1]). The file

Re: [NTG-context] mkiv and MetaPost

2009-01-13 Thread Otared Kavian
when one says \processMPbuffer[axes-1]). The file and the resulting PDF can be found on http://www.kavian.fr/tex/bug-mkiv Thanks in advance for any help. Best regards: OK I did not run the file, just guessing. In MKIV, by default buffers are not written to disk, so \processMPbuffer

Re: [NTG-context] mkiv and MetaPost

2009-01-13 Thread Taco Hoekwater
Otared Kavian wrote: Thanks Aditya for your explanation, but I must say that it is not convincing because with mkiv one of the buffers is processed with \processMPbuffer, while the other is not… So there must be some other hidden behaviour which has changed between mkii and mkiv. I

Re: [NTG-context] How to overlap two figures?

2008-11-25 Thread Yue Wang
. you dont have to type the same code in each mp figure. see sec 3.4 of the metafun manual, you can processMPbuffer. Thank you again. Best regards, Dalyoung ___ If your question is of interest to others

Re: [NTG-context] How to overlap two figures?

2008-11-25 Thread Yue Wang
the length of code which is less important. you dont have to type the same code in each mp figure. see sec 3.4 of the metafun manual, you can processMPbuffer. also, \includeMPgraphic discussed in sec 3.7 Thank you again. Best regards, Dalyoung

[NTG-context] mkiv: bug in processMPbuffer

2008-10-24 Thread Otared Kavian
Hi Hans and Taco, The latest beta solves the problems metioned by Thomas Schmitz and myself concerning \uniqueMPgraphic: many thanks for your attention. However, I observed the following regarding \processMPbuffer: some grahpics don't show up when tyepset with mkiv, while they are fine

[NTG-context] Some Progress on Installing mswincontext.zip

2008-08-27 Thread David Arnold
(and even tried c: \Program Files\ghostgum\gsview\gsview32.exe), but neither worked. Any suggestions how I can get the go command to work? Secondly, what would I do to compile a metapost file in scite directly into PDF? I am aware of context way with processMPbuffer and other assorted tricks, and I

Re: [NTG-context] new version

2008-04-11 Thread Hans Hagen
[optional format][name][optional settings] which i somehow dislike 3. What about \startMPcode, \startMPpage, and \processMPbuffer? I think that the first approach will be easier to adapt. another option is: \useMPformat{metafun} (the reason for { }instead of [] is that it then can be used within

Re: [NTG-context] new version

2008-04-11 Thread Wolfgang Schuster
. \startuseMPgraphic[metafun]{...} is also an option but not consistent, unless we provide \startuseMPgraphic[optional format][name][optional settings] which i somehow dislike 3. What about \startMPcode, \startMPpage, and \processMPbuffer? I think that the first approach will be easier to adapt

Re: [NTG-context] new version

2008-04-10 Thread Aditya Mahajan
, then maybe something like \startuseMPgraphic{::metafun::bla} so that it does not break existing code. 3. What about \startMPcode, \startMPpage, and \processMPbuffer? I think that the first approach will be easier to adapt. Aditya

Re: [NTG-context] A sometxt bug (rather misfeature)

2007-08-30 Thread Hans Hagen
)) ; \stopbuffer \processMPbuffer[test] \blank[big] \startMPinitializations test := false ; \stopMPinitializations \processMPbuffer[test] Too bad context cannnot parse metapost syntax :) Workaround (ugly) Another workaround, slightly less ugly (as long as you count the number

[NTG-context] A sometxt bug (rather misfeature)

2007-08-29 Thread Aditya Mahajan
Hi, Found an interesting sometxt misfeature. \startMPinclusions boolean test ; test=true ; \stopMPinclusions \startbuffer[test] if test : label(\sometxt{True}, origin) ; fi ; label(\sometxt{False}, (10,10)) ; \stopbuffer \processMPbuffer[test] \blank[big

Re: [NTG-context] A sometxt bug (rather misfeature)

2007-08-29 Thread Aditya Mahajan
\processMPbuffer[test] \blank[big] \startMPinitializations test := false ; \stopMPinitializations \processMPbuffer[test] Too bad context cannnot parse metapost syntax :) Workaround (ugly) Another workaround, slightly less ugly (as long as you count the number of \sometxt in the if part

Re: [NTG-context] Draw chess board

2007-06-11 Thread Zhichu Chen
anything when I switch to buffer and use \processMPbuffer. On 6/10/07, Mojca Miklavec [EMAIL PROTECTED] wrote: On 6/6/07, Zhichu Chen wrote: Hi I've tried to write a test file which can only handle ;B[??], ;W[??], AB[??], AW[??] now, and I haven't added the interaction part

  1   2   >